package com.mpp.admin.util;

import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.crypto.hash.SimpleHash;

/**
 * @author mapp
 * @des 加密工具类
 * @date 2019/2/13
 */
public class ShiroPasswprdUtil {

    public static String encryptPwd(String pwd, String salt) {
        SimpleHash hash = new SimpleHash("MD5", pwd, salt, 1024);
        String encodedPassword = hash.toHex();
        return encodedPassword;
    }

    public static void main(String[] args) {

        System.out.println(encryptPwd("888888", "test"));
    }
}
